import { defineConfig } from "vite";
import monkey from "vite-plugin-monkey";
import dayjs from "dayjs";

export default defineConfig(() => {
    const version = dayjs().format("YYYYMMDD.HHmm");
    return {
        plugins: [
            monkey({
                entry: "src/main.ts",
                userscript: {
                    icon: "",
                    namespace: "npm/vite-plugin-monkey",
                    version,
                    match:["*://*/*"],
                    description: "del ads",
                    author: "liuyonghu",
                    unwrap: true,
                    updateURL:
                        "https://gitee.com/liuyonghu/del-ads/raw/master/dist/waipian.user.js",
                    downloadURL:
                        "https://gitee.com/liuyonghu/del-ads/raw/master/dist/waipian.user.js",
                    homepageURL:
                        "https://gitee.com/liuyonghu/del-ads/raw/master/dist/waipian.user.js",
                    "run-at":"context-menu",
                },
            }),
        ],
    };
});
